<?php
// turn on error reporting
error_reporting(E_ALL|E_STRICT);

// set the default timezone
date_default_timezone_set('Europe/Amsterdam');

// require the Hamlap_Haml class
require_once 'Hamlap/Haml.php';

// instantiate the Hamlap_Haml class
$haml = new Hamlap_Haml(array('escape' => true, 'compile_dir' => 'compiled'));
$haml->parse('templates/demo.phtml');

// render the output
$output = $haml->render();

// if compiling is enabled check if
// the output is a file path
($haml->getOption('compile') && is_file($output)) ? include $output : eval('?>'.$output);